import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/login',
      component: (resolve) => { require(['view/pages/login'], resolve) }
    },
    {
      path: '/index',
      component: (resolve) => { require(['view/pages/index'], resolve) }
    },
    {
      path: '/userinfo',
      component: (resolve) => { require(['view/user/userinfo'], resolve) }
    },
    {
      path: '/favorite',
      component: (resolve) => { require(['view/user/favorite/favorite'], resolve) }
    },
    {
      path: '/comic',
      component: (resolve) => { require(['view/user/comic/comic'], resolve) }
    },
    {
      path: '/chapter',
      component: (resolve) => { require(['view/user/comic/chapter'], resolve) }
    },
    {
      path: '/comment',
      component: (resolve) => { require(['view/base/Comment/Panel/CommentPanel'], resolve) }
    },
    {
      path: '/reply',
      component: (resolve) => { require(['view/base/Comment/Panel/ReplyPanel'], resolve) }
    },
    {
      path: '/pubchapter',
      component: (resolve) => { require(['view/user/comic/pubchapter'], resolve) }
    },
    {
      path: '/pubcomics',
      component: (resolve) => { require(['view/user/comic/pubcomic'], resolve) }
    },
    {
      path: '/category',
      component: (resolve) => { require(['view/pages/category'], resolve) }
    },
    {
      path: '/rank',
      component: (resolve) => { require(['view/pages/rank'], resolve) }
    },
    {
      path: '/detail',
      component: (resolve) => { require(['view/pages/detail'], resolve) }
    },
    {
      path: '/read',
      component: (resolve) => { require(['view/pages/Read'], resolve) }
    }
  ]
})
